package com.example.springLearning.part14.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping("/spring/part14")
public class Spring14Controller {


//    @Autowired
//    @Qualifier("com.example.springLearning.part14.util.TimeCostFilter")
//    FilterRegistrationBean timeCostFilter;

    @PostMapping("/regStudent/{name}")
    public String saveUser(@PathVariable("name") String name) throws Exception {
        System.out.println("用户注册成功");
        return "ok";
    }
}
